package com.example.server.service.impl;

import com.example.server.entity.Chapter;
import com.example.server.mapper.ChapterMapper;
import com.example.server.service.ChapterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ChapterServiceImpl implements ChapterService {

    @Autowired
    private ChapterMapper chapterMapper;

    @Override
    public Chapter getChapterById(int id) {
        return chapterMapper.getChapterById(id);
    }

    @Override
    public List<Chapter> getChaptersByBookId(int idbook) {
        return chapterMapper.getChaptersByBookId(idbook);
    }
}
